# -*- coding: utf-8 -*-
"""
Created on Wed Sep 27 22:45:03 2017

@author: Luther
"""


def fib(n):
    if n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2)


n = int(input('type a number:'))
print(fib(n))
